<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{$seo.title}</title>
  <meta name="keywords" content="{$seo.keywords}" />
  <meta name="description" content="{$seo.description}" />
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

  <link href="{YUNYECMS_PUBLIC}plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" />
  <!-- Font Awesome -->
  <link rel="stylesheet" href="{YUNYECMS_UI}plugins/fontawesome-free/css/all.min.css"> <!-- Theme style -->
  <link rel="stylesheet" href="{YUNYECMS_UI}plugins/iCheck/all.css">
  <link rel="stylesheet" href="{YUNYECMS_UI}dist/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="{YUNYECMS_UI}dist/css/skins/_all-skins.min.css">
  <link href="{YUNYECMS_UI}plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" href="{YUNYECMS_UI}dist/css/plugins.css">
  <link rel="stylesheet" href="{YUNYECMS_UI}dist/css/member.css">
  <link rel="stylesheet" href="{YUNYECMS_PUBLIC}member/css/buy.css">
  <link rel="shortcut icon" href="{YUNYECMS_UI}dist/img/favicon.ico" />
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>

<body class="hold-transition skin-green sidebar-mini fixed">
  <div class="wrapper">
    {tpl "left","member"}
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Content Header (Page header) -->
      <div class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-6">
              <ol class="breadcrumb float-sm-left">
                <li class="breadcrumb-item" id="homeitem"><a href="{php echo url('member/member/index');}"
                    target="maincontent"> <i class="fa fa-home"></i>
                    首页</a></li>
                {loop name="breadcumb"}
                {if $i+1!=count($breadcumb)}
                <li class="breadcrumb-item"><a href="{$v.url}">{$v.title}</a></li>
                {else}
                <li class="breadcrumb-item active">{$v.title}</li>
                {/if}
                {/loop}
              </ol>
            </div>
            <div class="col-sm-6">
              {tpl "fast","member"}
            </div>
          </div>
        </div>
      </div>
      <div class="container-fluid" id="mainwrap">
        <!-- Main content -->
        <section class="content">
          <div class="row">
            <!-- left column -->
            <div class="col-md-12">
              <div class="card box-primary card-outline">
                <div class="card-header">
                  <div class="col-xs-12 col-sm-12 col-md-8 pb10">
                    <h3 class="card-title">会员升级</h3> &nbsp;
                  </div>
                </div>
                <!-- /.box-header -->
                {if !empty($list)}
                <div class="card-body">
                  <div class="col-md-12" style="padding-bottom: 120px;">
                    {loop name="list"}
                    <div class="product-details">
                      <div class="row">
                        <div class="col-lg-3 col-md-6">
                          <a href="#{php echo url('member/membergroup_goods/show',array('id'=>$v['goods_id']));}"> <img
                              src="{$v.pic}" alt="Gallery image" data-rjs="2"></a>
                        </div>
                        <div class="col-lg-5 col-md-4">
                          <div class="product-info" style="padding-bottom: 10px;">
                            <h2>{$v.goods_title}</h2>
                            <div class="product-abelity" style=" margin-top: 10px;">
                              <h6><span class="gprice text-red" id="zongjia">￥{$v.price}元</span></h6>
                            </div>
                          </div>
                          <div class="row margin-top-30 buywrap">
                            <form class="form-horizontal" id="defaultForm" method="post"
                              action="{php echo url('member/membergroup_goods/pay')}">
                              <div class="form-group row">
                                <div class="col-md-12">
                                  <dl class="host" style="padding-left: 15px;">
                                    {loop name="v['time_limit']" item="var" index="index2"}
                                    {if $var['price']}
                                    <dd <php>if($index2==0) { </php> class="buy_hover" <php> } </php> ><b
                                        data-value="{$var.price}" name="{$var.name}" id="{$var.id}">{$var.name}</b></dd>
                                    {/if}
                                    {/loop}
                                  </dl>
                                </div>
                              </div>
                              <div class="form-group row" style="padding-left: 15px;">
                                <div class="col-md-9">
                                  <input type="radio" name='paymode' value="1" id="payment_1"> <label
                                    for="payment_1">支付宝 <i></i></label> &nbsp; &nbsp;
                                  <input type="radio" name='paymode' value="2" id="payment_2" checked> <label
                                    for="payment_2">微信支付 <i></i></label>
                                </div>
                              </div>
                              <div class="form-group row" style="padding-left: 15px;">
                                <div class="col-md-9">
                                  <input name="goods_id" id="goods_id" type="hidden" value="{$v.goods_id}">
                                  <input type="hidden" name="token" id="token" value="{$token}">
                                  <input name="orderprice" id="orderprice" type="hidden">
                                  <input name="timelimit_name" id="timelimit_name" type="hidden">
                                  <input name="timelimit_id" id="timelimit_id" type="hidden">
                                  <button type="submit" class="btn btn-info btn-lg btn-flat margin-right-10"> <i
                                      class="icon-basket"></i> 购买 </button>
                                </div>
                              </div>
                            </form>
                          </div>
                        </div>
                      </div>
                    </div>
                    {/loop}
                  </div>
                  <ul class="pagination pull-left" style="display: none;">
                    {$page}
                  </ul>
                </div>
                {else}
                <div class="container">
                  <div class="callout callout-info">
                    <h4><i class="icon fa fa-info"></i> 提示信息：</h4>
                    暂时没有任何信息<br />
                  </div>
                </div>
                {/if}
              </div>
              <!-- /.box -->
            </div>
            <!--/.col (left) -->
          </div>
          <!-- /.row -->
        </section>
        <!-- /.content -->
      </div>

    </div>
    <!-- /.content-wrapper -->
    {tpl "foot","member"}
    <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->

  </div>
  <!-- ./wrapper -->
  <!-- jQuery 2.2.3 -->
  <script src="{YUNYECMS_UI}plugins/jQuery/jquery-3.6.1.min.js"></script>
  <!-- Bootstrap 3.3.6 -->
  <script src="{YUNYECMS_UI}bootstrap/js/bootstrap.min.js"></script>
  <!-- AdminLTE App -->
  <script src="{YUNYECMS_UI}dist/js/adminlte.js"></script>


  <script type="text/javascript">
    $(document).ready(function () {
      $(".search-option").toggle(function () {
        $(this).next(".select").slideDown();
      }, function () {
        $(this).next(".select").slideUp();
      });
      $(".select dd").click(function () {
        $a = $(this).attr('id');
        $b = $(this).html();
        $("#typeid").val($a);

        $(".search-option").html($b + '<i><em></em><span></span></i>');
        $(".select").slideUp();
      });

    });
  </script>
  <script type="text/javascript">
    price();
    function price() {
      var price = $(".host .buy_hover b").data("value");
      var timelimit_name = $(".host .buy_hover b").attr("name");
      var timelimit_id = $(".host .buy_hover b").attr("id");
      $("#zongjia").html("￥" + price + "元");
      $("#orderprice").val(price);
      $("#timelimit_name").val(timelimit_name);
      $("#timelimit_id").val(timelimit_id);
    }
    $(".buywrap").each(function () {
      $(this).find("dd").click(function () {
        $(this).siblings().removeClass("buy_hover");
        $(this).addClass("buy_hover");
        price();
      })
    });
    $(".buywrap dl").hover(
      function () { $(this).css("background", "#f9f9f9"); },
      function () { $(this).css("background", "none"); }
    );
  </script>


</body>

</html>